use std::fmt::Display;

#[test]
pub  fn test_format() {
    let s = "hello world";
    println!("{}", s);
    let s = format!("{} {}", "hello", "world");
    println!("{}", s);
    eprintln!( "{} {}", "hello", "world");

    let s = Student{
        name:"hello".to_string(),
        age:18
    };
    println!("{:?}", s);
    println!("{:#?}", s);
}
#[derive(Debug)]
struct Student{
    name:String,
    age:i32
}

impl Display for Student {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "name:{},age:{}", self.name, self.age)
    }
}

